<% row = cycle('odd', 'even') %>
<tr class="<%= row %>">
  <td><%= supplement.attachment_file_name %></td>
  <td><%= supplement.name.blank? ? "#{supplement.attachment_file_name}" : "#{supplement.name}" %></td>
  <td><%= supplement.attachment_content_type %></td>
  <td><%= number_to_human_size(supplement.attachment_file_size) %></td>
  <td>
    <% permitted_to? :delete, :admin_product_supplements do %>
      <%= button_to_delete "X", admin_product_product_supplement_path(params[:product_id], supplement.id) %>
    <% end %>
    <% permitted_to? :edit, :admin_product_supplements do %>
      <%= remote_button_to_edit "Editovat přílohu", edit_admin_product_product_supplement_path(params[:product_id], supplement.id), "supplement" %>
    <% end %>
  </td>
</tr>